home *** CD-ROM | disk | FTP | other *** search
/ Tux Racer / Tux Racer.iso / program files / Sunspire Studios / Tux Racer / courses / common / objects.tcl < prev    next >
Encoding:
Text File  |  2001-10-11  |  16.0 KB  |  487 lines

  1. # objects.tcl
  2. #
  3. # Specify standard objects
  4.  
  5. objcall :servers:render set_loading_text [gs loading_common_objects]
  6.  
  7. # ----- Begin output of [objserialize :models]
  8. objcreate {s_model_billboard} {:models:billboard}
  9.  
  10. objcreate {s_model_obj} {:models:tree_poly} \
  11.     {-filename} {treepoly.obj.strip}
  12.  
  13. objcreate {s_model_obj} {:models:tree} \
  14.     {-filename} {tree.obj.strip} \
  15.     {-backface_culling} {0}
  16.     
  17. objcreate {s_model_obj} {:models:gate} \
  18.     {-filename} {gate.obj.strip} \
  19.     -backface_culling 0
  20.     
  21. objcreate {s_model_obj} {:models:startgate} \
  22.     {-filename} {startgate.obj.strip} \
  23.     -backface_culling 0
  24.     
  25. objcreate {s_model_obj} {:models:bannerL} \
  26.     {-filename} {bannerL.obj.strip} \
  27.     {-backface_culling} {0}
  28.     
  29. objcreate {s_model_obj} {:models:bannerS} \
  30.     {-filename} {bannerS.obj.strip} \
  31.     {-backface_culling} {0}
  32.  
  33. objcreate {s_model_obj} {:models:flag} \
  34.     {-filename} {flag.obj.strip} \
  35.     {-backface_culling} {0}
  36.  
  37. objcreate {s_model_obj} {:models:fish} \
  38.     {-filename} {fish.obj.strip} \
  39.     {-backface_culling} {0}
  40.  
  41. objcreate {s_model_obj} {:models:fish_low} \
  42.     {-filename} {fish_low.obj.strip} \
  43.     {-backface_culling} {0}
  44.  
  45. objcreate {s_model_obj} {:models:signr} \
  46.     {-filename} {signr.obj.strip}
  47.  
  48. objcreate {s_model_obj} {:models:signc} \
  49.     {-filename} {signc.obj.strip}
  50.  
  51. objcreate {s_model_obj} {:models:signl} \
  52.     {-filename} {signl.obj.strip}
  53.  
  54. objcreate {s_model_obj} {:models:boulder} \
  55.     {-filename} {boulder.obj.strip}
  56.  
  57. objcreate {s_model_obj} {:models:large_rock} \
  58.     {-filename} {large_rock.obj.strip}
  59.  
  60. objcreate {s_model_obj} {:models:square} \
  61.     {-filename} {square.obj.strip} \
  62.     {-backface_culling} {0}
  63.  
  64. objcreate {s_model_obj} {:models:pad} \
  65.     {-filename} {pad.obj.strip} \
  66.     {-backface_culling} {0}
  67.  
  68. objcreate {s_model_obj} {:models:turning_pad} \
  69.     {-filename} {turning_pu.obj.strip} \
  70.     {-backface_culling} {0}
  71.  
  72. objcreate {s_model_obj} {:models:star} \
  73.     {-filename} {star.obj.strip} 
  74.  
  75. objcreate {s_model_obj} {:models:staryellow} \
  76.     {-filename} {star.obj.strip} 
  77.  
  78. objcreate {s_model_obj} {:models:bridge_closed} \
  79.     {-filename} {bridge_closed.obj.strip}
  80.  
  81. objcreate {s_model_obj} {:models:treebillboardtiny} \
  82.     {-filename} {treebillboardtiny.obj.strip} \
  83.     {-backface_culling} {0}
  84.  
  85. objcreate {s_model_obj} {:models:treebillboardsmall} \
  86.     {-filename} {treebillboardsmall.obj.strip} \
  87.     {-backface_culling} {0}
  88.  
  89. # ----- End output of [objserialize :models]
  90.  
  91.  
  92. # ----- Begin output of [objserialize :collidables]
  93. objcreate {s_collidable_herring} {:collidables:fish} \
  94.     {-collide_with_camera} {0}
  95.  
  96. objcreate {s_collidable_obj} {:collidables:tree} \
  97.     {-model} {:models:tree} \
  98.     {-friction_coeff} {0.3} \
  99.     {-collide_with_camera} {0}
  100.  
  101. objcreate {s_collidable_obj} {:collidables:billboard_tree} \
  102.     {-model} {:models:tree_poly} \
  103.     {-friction_coeff} {0.6} \
  104.     {-collide_with_camera} {0}
  105.  
  106. objcreate {s_collidable_boundary} {:collidables:boundary} \
  107.     {-width} {10.0}
  108.     
  109. objcreate {s_collidable_obj} {:collidables:bannerL} \
  110.     {-model} {:models:bannerL} \
  111.     {-friction_coeff} {0.5}
  112.     
  113. objcreate {s_collidable_obj} {:collidables:bannerS} \
  114.     {-model} {:models:bannerS} \
  115.     {-friction_coeff} {0.5}
  116.     
  117. objcreate {s_collidable_obj} {:collidables:gate} \
  118.     {-model} {:models:gate} \
  119.     {-friction_coeff} {0.3}
  120.  
  121. objcreate {s_collidable_obj} {:collidables:startgate} \
  122.     {-model} {:models:startgate} \
  123.     {-friction_coeff} {0.3}
  124.  
  125. objcreate {s_collidable_obj} {:collidables:signc} \
  126.     {-model} {:models:signc} \
  127.     {-friction_coeff} {0.3}
  128.  
  129. objcreate {s_collidable_obj} {:collidables:signr} \
  130.     {-model} {:models:signr} \
  131.     {-friction_coeff} {0.3}
  132.  
  133. objcreate {s_collidable_obj} {:collidables:signl} \
  134.     {-model} {:models:signl} \
  135.     {-friction_coeff} {0.3}
  136.  
  137. objcreate {s_collidable_obj} {:collidables:boulder} \
  138.     {-model} {:models:boulder} \
  139.     {-friction_coeff} {0.3}
  140.  
  141. objcreate {s_collidable_obj} {:collidables:large_rock} \
  142.     {-model} {:models:large_rock} \
  143.     {-friction_coeff} {0.3}
  144.  
  145. objcreate {s_collidable_obj} {:collidables:pad} \
  146.     {-model} {:models:pad} \
  147.     {-collide_with_camera} {0}
  148.  
  149. objcreate {s_collidable_obj} {:collidables:square} \
  150.     {-model} {:models:square} \
  151.     {-double_sided} {1} \
  152.     {-collide_with_camera} {0}
  153.  
  154. objcreate {s_collidable_obj} {:collidables:turning_pad} \
  155.     {-model} {:models:turning_pad} \
  156.     {-collide_with_camera} {0}
  157.  
  158. objcreate {s_collidable_obj} {:collidables:bridge_closed} \
  159.     {-model} {:models:bridge_closed} \
  160.     {-friction_coeff} {0.3}
  161.  
  162. # ----- End output of [objserialize :collidables]
  163.  
  164.  
  165. # ----- Begin output of [objserialize :collision_responses]
  166. objcreate {s_collision_response_herring} \
  167.     {:collision_responses:herring}
  168.  
  169. objcreate {s_collision_response_sound3d} {:collision_responses:herring_sound} \
  170.     -action :actions:sounds:fish_pickup
  171.  
  172. objcreate {s_collision_response_sound3d} {:collision_responses:tree_hit_sound} \
  173.     -action :actions:sounds:tree_hit \
  174.     -delay 1 \
  175.     -min_speed 5
  176.  
  177. objcreate {s_collision_response_sound3d} {:collision_responses:rock_hit_sound} \
  178.     -action :actions:sounds:rock_hit \
  179.     -delay 1 \
  180.     -min_speed 5
  181.  
  182. objcreate {s_collision_response_sound3d} {:collision_responses:wood_hit_sound} \
  183.     -action :actions:sounds:wood_hit \
  184.     -delay 1 \
  185.     -min_speed 5
  186.  
  187. objcreate {s_collision_response_sound3d} {:collision_responses:launch_pad_sound} \
  188.     -action :actions:sounds:launch_pad \
  189.     -delay 1
  190.  
  191. objcreate {s_collision_response_sound3d} {:collision_responses:speed_pad_sound} \
  192.     -action :actions:sounds:speed_pad \
  193.     -delay 1
  194.  
  195. objcreate {s_collision_response_sound3d} {:collision_responses:turning_pwrup_sound} \
  196.     -action :actions:sounds:turning_pwrup \
  197.     -delay 1
  198.  
  199. objcreate {s_collision_response_physics} \
  200.     {:collision_responses:physics}
  201.  
  202. objcreate {s_collision_response_script} {:collision_responses:reset_player} \
  203.     {-script} {resetPlayer}
  204.  
  205. objcreate {s_collision_response_script} {:collision_responses:launch_player} \
  206.     {-script} {launchPlayer}
  207.  
  208. objcreate {s_collision_response_script} {:collision_responses:speed_player} \
  209.     {-script} {speedPlayer}
  210.  
  211. objcreate {s_collision_response_script} {:collision_responses:speed_player60} \
  212.     {-script} {speedPlayer60}
  213.     
  214. objcreate {s_collision_response_script} {:collision_responses:turn_player} \
  215.     {-script} {turning_powerup}
  216. # ----- End output of [objserialize :collision_responses]
  217.  
  218.  
  219. # ----- Begin output of [objserialize :objects]
  220. objcreate {s_object3d} {:objects:anim_node} \
  221.     {-drawable_model} {:models:billboard} \
  222.     {-texture} {:textures:object:a} \
  223.     {-animation} {1}
  224.  
  225. objcreate {s_object3d} {:objects:finish} \
  226.     {-drawable_model} {:models:gate} \
  227.     {-texture} {:textures:object:finish} \
  228.     {-collidable_object} {:collidables:gate} \
  229.     {-collision_response_list} {:collision_responses:physics :collision_responses:rock_hit_sound}
  230.  
  231. objcreate {s_object3d} {:objects:flag} \
  232.     {-drawable_model} {:models:flag} \
  233.     {-texture} {:textures:object:flag}
  234.  
  235. objcreate {s_object3d} {:objects:herring} \
  236.     {-drawable_model} {:models:fish} \
  237.     {-texture} {:textures:object:fish} \
  238.     -lowres_distance 100.0 \
  239.     -lowres_model :models:fish_low \
  240.     {-collidable_object} {:collidables:fish} \
  241.     {-collision_response_list} {:collision_responses:herring \
  242.                                     :collision_responses:herring_sound}
  243.  
  244. objcreate {s_object3d} {:objects:reset} \
  245.     {-drawable_model} {:models:billboard} \
  246.     {-texture} {:textures:object:r} \
  247.     {-scale} {1.0 2.0 1.0} \
  248.     {-reset_point} {1} \
  249.     {-billboard} {1}
  250.  
  251. objcreate {s_object3d} {:objects:start_point} \
  252.     {-drawable_model} {:models:billboard} \
  253.     {-texture} {:textures:object:s} \
  254.     {-scale} {1.0 1.0 1.0} \
  255.     {-start_point} {1} \
  256.     {-billboard} {1}
  257.  
  258. objcreate {s_object3d} {:objects:start} \
  259.     {-drawable_model} {:models:gate} \
  260.     {-texture} {:textures:object:start} \
  261.     {-collidable_object} {:collidables:gate} \
  262.     {-collision_response_list} {:collision_responses:physics :collision_responses:rock_hit_sound}
  263.  
  264. objcreate {s_object3d} {:objects:startgate} \
  265.     {-drawable_model} {:models:startgate} \
  266.     {-texture} {:textures:object:startgate_decal} \
  267.     {-collidable_object} {:collidables:startgate} \
  268.     {-collision_response_list} {:collision_responses:physics :collision_responses:rock_hit_sound} \
  269.     {-bump_map_decal_texture} {:textures:object:startgate_decal} \
  270.     {-bump_map_texture} {:textures:object:startgate_bump} \
  271.     {-bump_mapping_enabled} {1}
  272.  
  273. objcreate {s_object3d} {:objects:tree} \
  274.     {-drawable_model} {:models:tree} \
  275.     {-texture} {:textures:object:tree} \
  276.     -lowres_distance 100.0 \
  277.     -lowres_model :models:treebillboardsmall \
  278.     -lowres_texture :textures:object:treebillboard \
  279.     {-collidable_object} {:collidables:tree} \
  280.     {-collision_response_list} {:collision_responses:physics :collision_responses:tree_hit_sound} \
  281.     {-size_variance} {0.5}
  282.  
  283. objcreate {s_object3d} {:objects:bannerL} \
  284.     {-drawable_model} {:models:bannerL} \
  285.     {-texture} {:textures:object:bannerL} \
  286.     {-collidable_object} {:collidables:bannerL} \
  287.     {-collision_response_list} {:collision_responses:physics :collision_responses:wood_hit_sound}
  288.     
  289. objcreate {s_object3d} {:objects:bannerS} \
  290.     {-drawable_model} {:models:bannerS} \
  291.     {-texture} {:textures:object:bannerL} \
  292.     {-collidable_object} {:collidables:bannerS} \
  293.     {-collision_response_list} {:collision_responses:physics :collision_responses:wood_hit_sound}
  294.     
  295. objcreate {s_object3d} {:objects:signr} \
  296.     {-drawable_model} {:models:signr} \
  297.     {-texture} {:textures:object:sign} \
  298.     {-collidable_object} {:collidables:signr} \
  299.     {-collision_response_list} {:collision_responses:physics :collision_responses:wood_hit_sound}
  300.  
  301. objcreate {s_object3d} {:objects:signl} \
  302.     {-drawable_model} {:models:signl} \
  303.     {-texture} {:textures:object:sign} \
  304.     {-collidable_object} {:collidables:signl} \
  305.     {-collision_response_list} {:collision_responses:physics :collision_responses:wood_hit_sound}
  306.  
  307. objcreate {s_object3d} {:objects:signc} \
  308.     {-drawable_model} {:models:signc} \
  309.     {-texture} {:textures:object:sign} \
  310.     {-collidable_object} {:collidables:signc} \
  311.     {-collision_response_list} {:collision_responses:physics :collision_responses:wood_hit_sound}
  312.  
  313. objcreate {s_object3d} {:objects:boulder} \
  314.     {-drawable_model} {:models:boulder} \
  315.     {-texture} {:textures:object:boulder} \
  316.     {-collidable_object} {:collidables:boulder} \
  317.     {-collision_response_list} {:collision_responses:physics :collision_responses:rock_hit_sound}
  318.  
  319. objcreate {s_object3d} {:objects:boundary} \
  320.     {-collidable_object} {:collidables:boundary} \
  321.     {-collision_response_list} {:collision_responses:physics}
  322.  
  323. objcreate {s_object3d} {:objects:reset_square} \
  324.     {-collidable_object} {:collidables:square} \
  325.     {-collision_response_list} {:collision_responses:reset_player}
  326.  
  327. objcreate {s_object3d} {:objects:launch_pad} \
  328.     {-drawable_model} {:models:pad} \
  329.     {-collidable_object} {:collidables:pad} \
  330.     {-collision_response_list} {:collision_responses:launch_player :collision_responses:physics :collision_responses:launch_pad_sound} \
  331.     {-anim_texture} {1} \
  332.     {-anim_texture_list} {{:textures:object:jump1 0.5} \
  333.     {:textures:object:jump2 0.5} {:textures:object:jump3 0.5}}
  334.     
  335. objcreate {s_object3d} {:objects:speed_pad} \
  336.     {-drawable_model} {:models:pad} \
  337.     {-collidable_object} {:collidables:pad} \
  338.     {-collision_response_list} {:collision_responses:speed_player :collision_responses:physics :collision_responses:speed_pad_sound} \
  339.     {-anim_texture} {1} \
  340.     {-anim_texture_list} {{:textures:object:accel4 0.5} \
  341.     {:textures:object:accel3 0.5} {:textures:object:accel2 0.5} \
  342.     {:textures:object:accel1 0.5}}
  343.     
  344. objcreate {s_object3d} {:objects:speed_pad60} \
  345.     {-drawable_model} {:models:pad} \
  346.     {-collidable_object} {:collidables:pad} \
  347.     {-collision_response_list} {:collision_responses:speed_player60 :collision_responses:physics :collision_responses:speed_pad_sound} \
  348.     {-anim_texture} {1} \
  349.     {-anim_texture_list} {{:textures:object:accel4 0.5} \
  350.     {:textures:object:accel3 0.5} {:textures:object:accel2 0.5} \
  351.     {:textures:object:accel1 0.5}}
  352.  
  353. objcreate {s_object3d} {:objects:turning_pad} \
  354.     {-drawable_model} {:models:turning_pad} \
  355.     {-texture} {:textures:object:turning_pad} \
  356.     {-collidable_object} {:collidables:turning_pad} \
  357.     {-collision_response_list} {:collision_responses:turn_player :collision_responses:physics :collision_responses:turning_pwrup_sound}
  358.  
  359. objcreate {s_object3d} {:objects:large_rock} \
  360.     {-drawable_model} {:models:large_rock} \
  361.     {-texture} {:textures:object:large_rock} \
  362.     {-collidable_object} {:collidables:large_rock} \
  363.     {-collision_response_list} {:collision_responses:physics :collision_responses:rock_hit_sound} \
  364.     {-size_variance} {0.1}
  365.  
  366. objcreate {s_object3d} {:objects:bridge_closed} \
  367.     {-drawable_model} {:models:bridge_closed} \
  368.     {-texture} {:textures:object:bridge_closed} \
  369.     {-collidable_object} {:collidables:bridge_closed} \
  370.     {-collision_response_list} {:collision_responses:physics :collision_responses:rock_hit_sound} \
  371.     {-size_variance} {0.1}
  372.  
  373. objcreate {s_object3d} {:objects:large_sign_right} \
  374.     {-drawable_model} {:models:bridge_closed} \
  375.     {-texture} {:textures:object:large_sign_right} \
  376.     {-collidable_object} {:collidables:bridge_closed} \
  377.     {-collision_response_list} {:collision_responses:physics :collision_responses:rock_hit_sound} \
  378.     {-size_variance} {0.1}
  379.  
  380. objcreate {s_object3d} {:objects:large_sign_left} \
  381.     {-drawable_model} {:models:bridge_closed} \
  382.     {-texture} {:textures:object:large_sign_left} \
  383.     {-collidable_object} {:collidables:bridge_closed} \
  384.     {-collision_response_list} {:collision_responses:physics :collision_responses:rock_hit_sound} \
  385.     {-size_variance} {0.1}
  386.  
  387. objcreate {s_object3d} {:objects:snd_birds_forest} \
  388.     {-drawable_model} {:models:billboard} \
  389.     {-texture} {:textures:object:speaker} \
  390.     -height 10 \
  391.     -billboard 1 \
  392.     -sound_emitter 1 \
  393.     -sound_action :actions:sounds:forestbirds \
  394.     -sound_delay 3 \
  395.     -sound_delay_variance 2 \
  396.     -sound_pos_variance {5 5 5} \
  397.     -scale {4 4 4}
  398.  
  399. objcreate {s_object3d} {:objects:snd_birds_caw} \
  400.     {-drawable_model} {:models:billboard} \
  401.     {-texture} {:textures:object:speaker} \
  402.     -height 15 \
  403.     -billboard 1 \
  404.     -sound_emitter 1 \
  405.     -sound_action :actions:sounds:caw_birds \
  406.     -sound_delay 10 \
  407.     -sound_delay_variance 8 \
  408.     -sound_pos_variance {15 5 15} \
  409.     -scale {4 4 4}
  410.  
  411. objcreate {s_object3d} {:objects:snd_rolling_boulder} \
  412.     {-drawable_model} {:models:billboard} \
  413.     {-texture} {:textures:object:speaker} \
  414.     -billboard 1 \
  415.     -sound_emitter 1 \
  416.     -sound_action :actions:sounds:rolling_boulder \
  417.     -scale {4 4 4}
  418.  
  419. objcreate {s_object3d} {:objects:snd_truck} \
  420.     {-drawable_model} {:models:billboard} \
  421.     {-texture} {:textures:object:speaker} \
  422.     -billboard 1 \
  423.     -sound_emitter 1 \
  424.     -sound_action :actions:sounds:truck \
  425.     -scale {4 4 4}
  426.  
  427. objcreate {s_object3d} {:objects:snd_rushing_water} \
  428.     {-drawable_model} {:models:billboard} \
  429.     {-texture} {:textures:object:speaker} \
  430.     -billboard 1 \
  431.     -height 5 \
  432.     -sound_emitter 1 \
  433.     -sound_action :actions:sounds:rushing_water
  434.  
  435. objcreate {s_object3d} {:objects:snd_whistling_wind} \
  436.     {-drawable_model} {:models:billboard} \
  437.     {-texture} {:textures:object:speaker} \
  438.     -billboard 1 \
  439.     -height 5 \
  440.     -sound_emitter 1 \
  441.     -sound_action :actions:sounds:whistling_wind
  442.  
  443. objcreate {s_object3d} {:objects:stargreen} \
  444.     {-drawable_model} {:models:star} \
  445.     {-texture} {:textures:object:stargreen} 
  446.  
  447. objcreate {s_object3d} {:objects:staryellow} \
  448.     {-drawable_model} {:models:star} \
  449.     {-texture} {:textures:object:staryellow}
  450. # ----- End output of [objserialize :objects]
  451.  
  452. # ----- Begin output of [objserialize :palette]
  453. objcreate {s_object3d_palette} {:palette} \
  454.     {-mappings} {\
  455.     {(255, 128, 255) => :objects:reset} \
  456.     {(255, 255, 255) => :objects:tree} \
  457.     {(194,  40,  40) => :objects:flag} \
  458.     {( 28, 185, 204) => :objects:herring} \
  459.     }
  460. # ----- End output of [objserialize :palette]
  461.  
  462.  
  463. #----Load objects for cup
  464. objcall :servers:render set_loading_text [gs loading_cup_objects]
  465.  
  466. set commondir [pwd]
  467.  
  468. if { [file exists $cup_dir/objects.tcl] } {
  469.     cd $cup_dir
  470.     source objects.tcl
  471. }
  472.  
  473. cd $commondir
  474.  
  475. #----Load objects for trophy
  476. objcall :servers:render set_loading_text [gs loading_trophy]
  477.  
  478. set commondir [pwd]
  479.  
  480. if { [file exists $cup_dir/trophy.tcl] } {
  481.     cd $cup_dir
  482.     source trophy.tcl
  483. }
  484.  
  485. cd $commondir
  486.  
  487.